<template>
  <div id="category-list">
    <div 
    v-for="(item,index) in goodsInfo" 
    :key="index" >
      <!-- <h2>{{item.cat_name}}</h2> -->
      <title-bar bg_color="#fff" font_color="#333">
        <h3 slot="center">/ {{item.cat_name}} /</h3>
      </title-bar>
      <van-grid :column-num="3">
        <van-grid-item 
        v-for="(item1,index1) in item.children" 
        :key="index1" :icon="item1.cat_icon" :text="item1.cat_name">

        </van-grid-item>
      </van-grid>
    </div>
    
  </div>
</template>

<script>
import TitleBar from '../common/title_bar/TitleBar.vue'
import Vue from 'vue';
import { Grid, GridItem } from 'vant';
import "vant/lib/grid/style"
import 'vant/lib/grid-item/style'
Vue.use(Grid);
Vue.use(GridItem);

export default {
  components: { TitleBar },
  name:"CategoryList",
  props:{
    goodsInfo:Array
  },
  data() {
    return {
      // goodsList:this.goodsInfo
    }
  },
}
</script>

<style scoped>

</style>